/////////////////////////////////////////////////////////////////////////////
//
// XepdtConnectionListener.h
//
//
/////////////////////////////////////////////////////////////////////////////

#pragma once

#include <connectionlistener.h>

class CXepdtClient;

/////////////////////////////////////////////////////////////////////////////
// CXepdtConnectionListener

class CXepdtConnectionListener : public gloox::ConnectionListener
{
// Construction
public:
	CXepdtConnectionListener();
	CXepdtConnectionListener( CXepdtClient* pClient );
	virtual ~CXepdtConnectionListener();

	gloox::ConnectionError getConnectionResult(){return m_pResult;}

// Override
public:
	virtual void onConnect();
	virtual void onDisconnect( enum gloox::ConnectionError );
	virtual bool onTLSConnect( const struct gloox::CertInfo& );

private:
	CXepdtClient*   m_pClient;
	gloox::ConnectionError m_pResult;
};